<?php
namespace Json\Controller;
use Think\Controller;
class CourseController extends Controller {
  public function courselistJson(){
       
       $use= $this->users=M('course')->select();
   echo json_encode($use);
      } 
  
    public function courseOneJson($id){
       
       $course = M('course') -> where("courseid='$id'") -> find();
       echo json_encode($course);
      } 

}